<div class="SipeiMain_r fr">
    <h2 class="clearfix fonts_18 height45 fontc_444"><?php echo $this->title; ?></h2>
    
    <div class="clearfix back_bgf border_c mt15 pt20 pb20">
        <div class="clearfix pb20 pl30">
           <!-- <input type="button" onclick="add(0,0)" value="新增"  style="margin-right:30px;" class="cursor fr b_a_n border_3 back_bgfb w80 height32 fontc_FFF fonts_12" />-->
        </div>
        <table class="height40">
            <thead class="back_bgf5 fontc_666">
                <tr>
                    <th width="100" align="left" class="m_hr_t m_hr_b pl20">功能代码</th>
                    <th width="203" align="left" class="m_hr_t m_hr_b pl5">功能名称</th>
                    <th width="200" align="left" class="m_hr_t m_hr_b">URL</th>
                    <th width="180" align="center" class="m_hr_t m_hr_b">备注</th>
                    <th width="90" align="center" class="m_hr_t m_hr_b">操作</th>
                </tr>
            </thead>
            <tbody class="fontc_444">
                <?php echo $categorys; ?>
            </tbody>
        </table>
    </div>
</div>
<script>
    var sj = '<?php echo time(); ?>';
    function edit(id,pid) {
        api = $.dialog({
            id: 'testID2',
            lock: true,
            padding:0,
            fixed: true,
            title:"编辑",
            width:480,
            height:450,
            max: false,
            min: false
        });
        $.get('/role/default/update',{mid:id,pid:pid},function(html){
            api.content(html);
        });	
    }
    
    function add(id,pid) {
        api = $.dialog({
            id: 'testID2',
            lock: true,
            padding:0,
            fixed: true,
            title:"新增",
            width:480,
            height:450,
            max: false,
            min: false
        });
        $.get('/role/default/add',{mid:id,pid:pid,time:sj},function(html){
            if(html==1){
                alert('添加失败');
            }
            api.content(html);
        });	
    }
    
    function del(id,pid){
        $.dialog.confirm('确定删除吗',function(){
            var url = '<?php echo $this->createUrl('/role/default/menu'); ?>';
            $.get('/role/default/del_menu',{mid:id,pid:pid},function(html){             
                if(html==1){
                    window.location = url;
                }else{
                    alert(删除失败);
                }
            });
        });
    }
</script>